package scau.erps.view.system.team;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

/**
 * 订单竞价对话框——小组 *  
 * @author DCJ
 *
 */
public class MyOrderBiddingDialog extends JDialog{
	private static final long serialVersionUID = 1L;
	public MyOrderBiddingDialog(){
		this.setTitle("订单竞价");
		this.setModal(false);
		this.setSize(1024, 700);
		this.setResizable(false);
		this.setLocationRelativeTo(null);
		this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
		JPanel contentPanel = new JPanel();
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setPreferredSize(new Dimension(1000,650));
		MySystemOrderBiddingPanel systemOrderBiddingPanel = new MySystemOrderBiddingPanel();	
		MyOrderBiddingPanel myBiddingPanel = new MyOrderBiddingPanel();		
		tabbedPane.add(systemOrderBiddingPanel,"订单竞价");
		tabbedPane.add(myBiddingPanel,"查看我的竞价");
		contentPanel.add(tabbedPane, BorderLayout.CENTER);
		this.setContentPane(contentPanel);
		this.setVisible(true);
		this.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				int flag = JOptionPane.showConfirmDialog(null, "关闭对话框将不能再对订单竞价或修改竞价，确认关闭?", "提示", JOptionPane.YES_NO_OPTION,  
                        JOptionPane.INFORMATION_MESSAGE);  
                if(JOptionPane.YES_OPTION == flag){ 
                	dispose();
                }	
			}			
		});
	}
}
